<template>
  <view>
    <view class="empty-placeholder" v-if="show">
      <!-- 搜索数据为空 -->
      <image
        v-if="search_empty"
        class="icon-xl"
        src="../../static/search_empty.png"
      ></image>
      <!-- 暂无数据 -->
      <image v-else class="icon-xl" :src="icon"></image>

      <view v-if="search_empty" class="txt">未发现数据~</view>
      <view v-else class="txt">{{ message }}</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },

  mixins: [],
  components: {},
  props: {
    show: {
      type: Boolean,
      default: false,
    },
    search_empty: {
      type: Boolean,
      default: false,
    },
    icon: {
      default: "../../static/no_data.png",
    },
    message: {
      default: "暂无数据~",
    },
  },
  methods: {},
  computed: {},
  watch: {},
};
</script>
<style lang="less" scoped="scoped">
.empty-placeholder {
  margin-top: 150rpx;
  text-align: center;
  .icon-xl {
    width: 400rpx;
    height: 314rpx;
    display: block;
    margin: 0 auto;
  }
  .txt {
    font-size: 28rpx;
    color: #c6c6c6;
    margin-top: 25rpx;
  }
}
</style>